package ooday03;

public class SwimTest {
    public static void main(String[] args) {
        Dog dog =new Dog("小黄",4,"黄");
        dog.drink(); //Dog走Animal类
        dog.eat();  //Dog类重写之后
        dog.lookHome(); //Dog所持有的
        dog.swim(); //Dog类重写后的
        System.out.println("-------------------");
        Chick chick =new Chick("ikun",2,"灰");
        chick.drink();  //chick走Animal类
        chick.eat();    //chick类重写之后
        chick.layEggs();    //chick所持有的
        System.out.println("-------------------");
        Fish fish=new Fish("泡泡",6,"金");
        fish.drink();   //fish走Animal类
        fish.eat(); //fish重写之后
        fish.swim();    //fish重写后的

    }
}
